use std::collections::HashMap;
use std::time::Duration;

fn main() {
    let pid = std::process::id();
    println!("My pid is {}", pid);
    let mut a = HashMap::new();
    for i in 0..1024u64 {
        a.insert(i, Box::new([0u8; 1024 * 1024]));
    }
    std::thread::sleep(Duration::from_secs(20));
    for i in 0..1024u64 {
        a.remove(&i);
    }
    for _ in 0..20 {
        std::thread::sleep(Duration::from_secs(1));
    }
}
